PatternOperationTranslate
Type
statement
Summary
Apply a translation to a pattern.
Syntax
translate <mPattern> by <mTranslation>
Description
translates the transform of mPattern by mTranslation
Parameters
Name | Type | Description |
---|---|---|
mPattern | An expression which evaluates to a pattern. | |
mTranslation | An expression which evaluates to a list of 2 numbers, the x and y offsets of the translation. |
Examples
// Create a new pattern paint from an image file
variable tPattern
put pattern with image from file "images/pattern.png" into tPattern
// Translate the pattern 20 units to the left.
translate tPattern by [-20,0]